package com.wbt.huawei;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * @program: Thread-demo
 * @description:
 * @author: Wang·Baotong
 * @create: 2021-03-10 14:16
 *
 *
 *
 */
public class Words {

    public static void main(String[] args) throws IOException {
        BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
        String str;
        String[] words = new String[3];
        int flag = 0;
        while ((str = bf.readLine()) != null){
            words[flag%3] = str;
            if(flag % 3 == 2){
                System.out.println(reverseWords(words[0],Integer.parseInt(words[1]),Integer.parseInt(words[2])));
            }
            flag++;
        }
    }

    private static String reverseWords(String str,int start,int end){
        String[] words = str.split(" ");
        StringBuffer sb = new StringBuffer();
        for (int i=0;i<words.length;i++){
            if(start<=i && i <= end){
                sb.append(words[end-i+start]).append(" ");
            }else {
                sb.append(words[i]).append(" ");
            }
        }
        return sb.toString();
    }
}
